/**
 * 类目管理
 */
import request from '@/utils/request'

/**
 * @method getShelfCategoryList
 * @description  获取栏目
 */
export function getShelfCategoryList(params) {
  return request({
    url: '/mall/admin/shelf/category/list',
    method: 'get',
    params: params
  })
}

/**
 * @method addShelfCategory
 * @description 新增栏目
 */
export function addShelfCategory(data) {
  return request({
    url: '/mall/admin/shelf/category/add',
    method: 'post',
    data: data
  })
}

/**
 * @method deleteShelfCategory
 * @description 删除栏目
 */
export function deleteShelfCategory(params) {
  return request({
    url: '/mall/admin/shelf/category/delete',
    method: 'delete',
    params: params
  })
}

/**
 * @method updateShelfCategory
 * @description 更新栏目
 */
export function updateShelfCategory(data) {
  return request({
    url: '/mall/admin/shelf/category/update',
    method: 'post',
    data: data
  })
}

/**
 * @method getShelfList
 * @description 获取货架列表
 */
export function getShelfList(data) {
  return request({
    url: '/mall/admin/goods/shelf/list',
    method: 'post',
    data: data
  })
}

/**
 * @method getShelfDetail
 * @description 获取货架详情
 */
export function getShelfDetail(params) {
  return request({
    url: '/mall/admin/goods/shelf/detail',
    method: 'get',
    params: params
  })
}

/**
 * @method saveShelf
 * @description 保存货架
 */
export function saveShelf(data) {
  return request({
    url: '/mall/admin/goods/shelf/save',
    method: 'post',
    data: data
  })
}

// 保存扫码点单货架
export function saveOrderShelf(data) {
  return request({
    url: '/wcanyin_admin/admin/goods/shelf/save',
    method: 'post',
    data: data
  })
}

// 获取扫码点单列表
export function getOrderShelfList(data) {
  return request({
    url: '/wcanyin_admin/admin/goods/shelf/list',
    method: 'post',
    data
  })
}
